package com.study.bob.factory;

/**
 * Created by bob on 2016/4/30.
 */
public class ComputerFactory {

    public static SupComputer getComputer(String type,String ram,String hdd,String cpu){
        if("PC".equalsIgnoreCase(type)){
            return new SubPC(ram, hdd, cpu);
        }else if("SERVER".equalsIgnoreCase(type)){
            return new SubServer(ram, hdd, cpu);
        }
        return null;

    }
}
